home *** CD-ROM | disk | FTP | other *** search
/ Champak 122 / Vol 122.iso / games / super_cr.swf / scripts / DefineSprite_380 / frame_56 / DoAction.as
Encoding:
Text File  |  2011-01-06  |  873 b   |  41 lines

  1. Stage.showMenu = false;
  2. stop();
  3. var frozen = true;
  4. var psy = 100;
  5. psyche.enemyPsy = 100;
  6. psyche.spaceRdy = true;
  7. psyche.onEnterFrame = function()
  8. {
  9.    if(!frozen)
  10.    {
  11.       psy -= 0.12;
  12.       if(Key.isDown(32))
  13.       {
  14.          if(this.spaceRdy)
  15.          {
  16.             psy++;
  17.             this.spaceRdy = false;
  18.          }
  19.       }
  20.       else
  21.       {
  22.          this.spaceRdy = true;
  23.       }
  24.       this.psy1._xscale = psy;
  25.       this.psy2._xscale = 200 - psy;
  26.    }
  27. };
  28. count.timeLimit = 8000;
  29. count.secsLeft = 8;
  30. count.startTime = getTimer();
  31. count.onEnterFrame = function()
  32. {
  33.    this.currentTime = getTimer() - this.startTime;
  34.    this.remainingTime = this.timeLimit - this.currentTime;
  35.    if(this.remainingTime < this.secsLeft * 1000)
  36.    {
  37.       this.gotoAndPlay("num" + this.secsLeft);
  38.       this.secsLeft = this.secsLeft - 1;
  39.    }
  40. };
  41.